package com.itlong.cloud.paymenthub;

import com.itlong.cloud.POJO.DTO.property.PropertyAutoWithdrawDTO;
import com.itlong.cloud.POJO.DTO.property.PropertyWithdrawGetDTO;
import com.itlong.cloud.POJO.PO.PropertyAutoWithdrawCashSetInfoPO;
import com.itlong.cloud.POJO.VO.property.PropertyBalanceVO;
import com.itlong.cloud.POJO.VO.property.PropertyProjectAmountVO;
import com.itlong.cloud.POJO.VO.property.PropertyWithdrawVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * <desc>
 *      物业-提现服务-提现管理接口暴露。
 * <desc/>
 *
 * @createDate 2018/09/21.
 */
@FeignClient(name = "payment-hub-service")
public interface IPropertyWithdrawServiceClient {

    /**
     * <desc>
     *      物业提现信息分页查询
     * <desc/>
     *
     * @param propertyAccountGetDTO 分页查询参数
     * @return
     * @author Qiang.S
     * @createDate 2018-09-21
     */
    @RequestMapping(path="/property/finance/withdraw/getWithdrawByPage",method = {RequestMethod.POST})
    Page<PropertyWithdrawVO> getWithdrawByPage(@RequestBody PropertyWithdrawGetDTO propertyAccountGetDTO) throws Exception;

    /**
     * <desc>
     *      查询可提现余额
     * <desc/>
     *
     * @param projectId 项目编号
     * @return PropertyBalanceVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/09/23
     */
    @RequestMapping(path="/property/finance/withdraw/getBalance",method = {RequestMethod.POST})
    PropertyBalanceVO getBalance(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      判断支付密码是否正确
     * <desc/>
     *
     * @param projectId 项目编号
     * @param payPassword 支付密码
     * @return Integer
     * @author Qiang.S
     * @createDate 2018/09/23
     */
    @RequestMapping(path="/property/finance/withdraw/checkPayPassword",method = {RequestMethod.POST})
    Integer checkPayPassword(@RequestParam("projectId") String projectId, @RequestParam("payPassword") String payPassword) throws Exception;

    /**
     * <desc>
     *      判断第三方支付中银联状态是否正常
     * <desc/>
     *
     * @return Integer 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/10/09
     */
    @RequestMapping(path="/property/finance/withdraw/checkUnionpayStatus",method = {RequestMethod.POST})
    Integer checkUnionpayStatus() throws Exception;

    /**
     * <desc>
     *      自动提现设置
     * <desc/>
     *
     * @param propertyAutoWithdrawDTO 自动提现信息
     * @return MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/09/23
     */
    @RequestMapping(path="/property/finance/withdraw/setAutoWithdraw",method = {RequestMethod.POST})
    Integer setAutoWithdraw(@RequestBody PropertyAutoWithdrawDTO propertyAutoWithdrawDTO) throws Exception;

    /**
     * <desc>
     *      查询自动提现信息
     * <desc/>
     *
     * @param projectId 项目编号
     * @return MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/09/24
     */
    @RequestMapping(path="/property/finance/withdraw/getAutoWithdraw",method = {RequestMethod.POST})
    PropertyAutoWithdrawCashSetInfoPO getAutoWithdraw(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      提现
     * <desc/>
     *
     * @param projectId 项目编号
     * @param bankCardId 银行卡ID
     * @param amount 提现金额
     * @param loginUserId 操作人ID
     * @return MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/09/24
     */
    @RequestMapping(path="/property/finance/withdraw/withdraw",method = {RequestMethod.POST})
    BigDecimal withdraw(@RequestParam("projectId") String projectId, @RequestParam("bankCardId") String bankCardId,
                        @RequestParam("amount") String amount, @RequestParam("loginUserId") String loginUserId) throws Exception;

    /**
     * <desc>
     *      查询项目财务状态
     * <desc/>
     *
     * @param projectId 项目编号
     * @return
     * @author Qiang.S
     * @createDate 2018/10/24
     */
    @RequestMapping(path="/property/finance/withdraw/getFinanceStatusByProjectId",method = {RequestMethod.POST})
    String getFinanceStatusByProjectId(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      查询项目可提现金额
     * <desc/>
     *
     * @param projectId 项目编号
     * @return MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/09/24
     */
    @RequestMapping(path="/property/finance/withdraw/getProjectAmountInfo",method = {RequestMethod.POST})
    PropertyProjectAmountVO getProjectAmountInfo(@RequestParam("projectId") String projectId) throws Exception;

    /**
     * <desc>
     *      自动提现
     * <desc/>
     *
     * @return MessageVO 标准格式化响应结果
     * @author Qiang.S
     * @createDate 2018/09/26
     */
    @RequestMapping(path="/property/finance/withdraw/doAutoWithdraw",method = {RequestMethod.POST})
    void doAutoWithdraw() throws Exception;

}
